/**********************************************************************
*
*   Copyright(C) 2021
*   FileName: 
*   Version : V0.0.1
*   Date    : 2024-04-20
*   Author  : Song.YuLong@chipsbank
*   Description: 
*   
*   Others:
*
*   Function List:
*   History      :
*
***********************************************************************/


#include "config.h"
#include "debug.h"

#include "lcd_draw_base.h"
#include "lcd_draw_bmp.h"

#if 0
/**
 * @brief   获取BMP图片信息
 * @param   img_id:图片ID
 * @return  struct xa_ui_bmp_t类型指针
*/
struct xa_ui_bmp_t* xa_ui_bmp_getinfo(u16 img_id)
{
    uint16_t i;
    uint16_t count = sizeof(data_bmp)/sizeof(data_bmp[0]);
    for (i=0; i<count; i++) {
        if (img_id == data_bmp[i].id) {
            return (struct xa_ui_bmp_t*)&data_bmp[i];
        }
    }
    return NULL;
}


/**
 * @brief   显示图片
 * @param   x:显示位置X
 * @param   y:显示位置y
 * @param   img_id:图片ID
 * @param   inverse:反色
 * @param   draw_mode:draw模式
*/
void lcd_draw_bmp(int x, int y, u16 img_id, uint8_t inverse, uint8_t draw_mode)
{
    lcd_draw_buf(x, y, data_bmp[img_id].w, data_bmp[img_id].h, (uint8_t*)data_bmp[img_id]._data, inverse, draw_mode);
}

#endif